package com.veidy.blog.kotlin.deeplinks

import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import kotlinx.android.synthetic.main.activity_third.*

class ThirdActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_third)

        thirdTv.text="ThirdActivity"

        var action=intent.action

        var deeplink = intent.data

        var path = deeplink.path

        var LastPathSegment=deeplink.pathSegments

        var key = deeplink.getQueryParameter("key")

        var name = deeplink.getQueryParameter("name")

        var sex = deeplink.getQueryParameter("sex")

        thirdTv.text= "key:$key,name:$name,sex:$sex"
    }
}
